package com.seari.custody.service.Impl;

import com.seari.custody.bean.MonitorSupplier;
import com.seari.custody.bean.MonitorSupplierExample;
import com.seari.custody.mapper.MonitorSupplierMapper;
import com.seari.custody.service.IMonitorSupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional(rollbackFor = Exception.class)
@Service
public class MonitorSupplierImpl implements IMonitorSupplierService {
    @Autowired
    private MonitorSupplierMapper monitorSupplierMapper;
    @Override
    public List<MonitorSupplier> suppliers() {
        MonitorSupplierExample monitorSupplierExample = new MonitorSupplierExample();
        monitorSupplierExample.createCriteria().andAllowEqualTo("1");
        List<MonitorSupplier> monitorSuppliers = monitorSupplierMapper.selectByExample(monitorSupplierExample);
        return monitorSuppliers;
    }
}
